/*
 * @Author: wufan 929523653@qq.com
 * @Date: 2025-08-20 11:01:58
 * @LastEditors: wufan 929523653@qq.com
 * @LastEditTime: 2025-08-20 14:38:40
 * @FilePath: \mars3d-vue-project-01\src\pages\map\widget-store.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * index页面的widget配置
 * @copyright 火星科技 mars3d.cn
 * @author 火星渣渣灰 2022-02-19
 */
import { defineAsyncComponent, markRaw } from "vue"
import { WidgetState } from "@mars/common/store/widget"
import { StoreOptions } from "vuex"

const store: StoreOptions<WidgetState> = {
  state: {
    widgets: [
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/query-poi/index.vue"))),
        name: "query-poi",
        autoDisable: true
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/toolbar/index.vue"))),
        name: "toolbar",
        autoDisable: true
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/custom-toolbox/index.vue"))),
        name: "custom-toolbox"
        // autoDisable: false
        // group: "tools"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/job-site-list/index.vue"))),
        name: "job-site-list"
        // autoDisable: false,
        // group: "tools"
        // 【可选】明确指定要禁用的其他面板名称数组（优先级高于autoDisable）
        // disableOther: ["panel1", "panel2"]
        // 【可选】面板的元数据，可以存储各种自定义信息
        // meta: {
        //   title: "面板标题",
        //   icon: "icon-name",     // 面板图标
        //   description: "描述信息",
        //   // 其他自定义字段...
        // },

        // // 【可选】面板的初始状态配置
        // state: {
        //   visible: true,        // 是否可见（默认false）
        //   position: {           // 面板位置
        //     top: "10px",
        //     right: "10px",
        //     bottom: "10px",
        //     left: "10px"
        //   },
        //   size: {               // 面板尺寸
        //     width: "300px",
        //     height: "400px"
        //   }
        // },

        // // 【可选】面板的行为配置
        // behavior: {
        //   draggable: true,      // 是否可拖拽
        //   resizable: true,      // 是否可调整大小
        //   closable: true,       // 是否显示关闭按钮
        //   minimizable: true,    // 是否可最小化
        //   pinnable: true        // 是否可固定位置
        // },

        // // 【可选】依赖的其他服务或模块
        // dependencies: ["service1", "service2"],

        // // 【可选】面板的版本信息
        // version: "1.0.0",

        // // 【可选】面板的权限控制
        // permissions: {
        //   roles: ["admin", "user"],  // 允许访问的角色
        //   // 或者其他权限配置...
        // }
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-basemap/index.vue"))),
        name: "manage-basemap",
        group: "manage"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/index.vue"))),
        name: "manage-layers",
        group: "manage",
        disableOther: ["roamLine"]
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/scene-tree.vue"))),
        name: "layer-scenetree"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/picture-heatmap.vue"))),
        name: "layer-picture-heatmap"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/manage-layers/picture-guihua.vue"))),
        name: "layer-picture-guihua"
      },
      {
        component: markRaw(defineAsyncComponent(() => import("@mars/widgets/basic/location-point/index.vue"))),
        name: "location-point",
        group: "tools",
        autoDisable: false
      }
    ],
    openAtStart: ["query-poi", "toolbar", "custom-toolbox"]
  }
}

export default store
